package com.kwdb.sdk.exception;

/**
 * KWDB SDK异常类
 */
public class KWDBException extends Exception {
    
    private final String errorCode;
    
    public KWDBException(String message) {
        super(message);
        this.errorCode = "UNKNOWN";
    }
    
    public KWDBException(String message, Throwable cause) {
        super(message, cause);
        this.errorCode = "UNKNOWN";
    }
    
    public KWDBException(String errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }
    
    public KWDBException(String errorCode, String message, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }
    
    public String getErrorCode() {
        return errorCode;
    }
}
